<div class="login_body" id="setNewPassword">
    <div class="login_cont pub_wid">
        <h1><img src="/static/index/public/images/logo_b.png" /></h1>
        <div class="widthauto">
<!--            <div class="login_box rg">-->
<!--                <h2>重置密码</h2>-->
<!--                <div class="step widthauto">-->
<!--                    <span class="cur">1.验证手机号</span><em>———————</em><span>2.设置新密码</span>-->
<!--                </div>-->
<!--                <ul class="widthauto">-->
<!--                    <li><span>手机号码</span><br />-->
<!--                        <input v-model="phone" name="" type="text" placeholder="请输入手机号" class="inp"/>-->
<!--                    </li>-->
<!--                    &lt;!&ndash;                    <li><span>图形验证码</span><br />&ndash;&gt;-->
<!--                    &lt;!&ndash;                        <input name="" type="text" placeholder="请输入图形验证码" class="inp"/>&ndash;&gt;-->
<!--                    &lt;!&ndash;                        <img src="/static/index/public/images/yanma.jpg" />&ndash;&gt;-->
<!--                    &lt;!&ndash;                    </li>&ndash;&gt;-->
<!--                    <li><span>短信验证码</span><br />-->
<!--                        <input  v-model="code" name="" type="text" placeholder="请输入短信验证码" class="inp"/>-->
<!--                        <a v-if="isSendCode" @click="getMessageCode()" class="yanma">获取验证码</a>-->
<!--                        <a v-if='!isSendCode' class="yanma">{{maxTime}}</a>-->
<!--                    </li>-->
<!--                </ul>-->
<!--                <h3><a href="#">下一步 {{maxTime}}</a></h3>-->
<!--            </div>-->
            <div class="login_box rg">
                <h2>重置密码</h2>
                <div class="step widthauto"> <span class="cur"><a style="color: #ffffff" href="/index/member/changePassword">1.验证手机号</a></span><em>———————</em><span class="cur">2.设置新密码</span> </div>
                <ul class="widthauto">
                    <li><span>新密码</span><br />
                        <input v-model="newPassword" name="" type="text" placeholder="请输入6~20位密码" class="inp"/>
                    </li>
                    <li><span>确认新密码</span><br />
                        <input v-model="anewPassword" name="" type="text" placeholder="请再次输入新密码" class="inp"/>
                    </li>
                </ul>
<!--                class="cur"-->
                <h3><a  @click="setNewPassword()">确认修改</a></h3>
            </div>
        </div>
    </div>
</div>
<script>
    var setNewPasswordVm = new Vue({
        el:'#setNewPassword',
        data:{
            newPassword:'',
            anewPassword:'',

        },
        methods:{
            setNewPassword:function () {
                var el = this;
                var postData = {
                    'newPassword':el.newPassword,
                    'anewPassword':el.anewPassword
                }
                AjaxPost(postData,'/index/member/updatePassword').then((response)=>{
                    if(response.status == 1){
                        $.customToastr('success',response.message)
                        setTimeout(()=>{
                            window.location.href='/index/member/login'
                        },1000)

                    }
                }).catch(()=>{
                    setTimeout(()=>{
                        window.location.href='/index/member/changePassword'
                    },1000)
                })
            },
        },
        mounted(){
        }
    })
</script>